﻿@model cloudscribe.Core.IdentityServerIntegration.Models.ClientEditViewModel
@using cloudscribe.Core.IdentityServerIntegration
@inject ICoreThemeHelper themeHelper
@inject IStringLocalizer<CloudscribeIds4Resources> sr

@{
    var themeSettings = themeHelper.GetThemeSettings();
    if (themeSettings.AdminSideNavExpanded) { ViewData["SideNavToggle"] = "show"; }
    ViewData["SideNavVisible"] = true;
}
@if (Model.CurrentClient == null)
{
    <h2>@ViewData["Title"]</h2>
    <partial name="NewClientPartial" model="Model.NewClient" />
}
else
{
    <h2>@ViewData["Title"]</h2>
    <partial name="EditClientPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientRedirectsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientLogoutRedirectsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientAllowedCorsOriginsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientSecretsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientClaimsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientAllowedGrantTypesPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientAllowedScopesPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientProviderRestrictionsPartial" model="Model.CurrentClient" />
    <hr class="blue-divider" />
    <partial name="ClientPropertiesPartial" model="Model.CurrentClient" />
    <div class="mt-3"></div>
}


@section SideNav {
    <partial name="AdminSideNav" />
}
@section Toolbar{
    <partial name="AdminSideNavToggle" />
}
@section Scripts {
    <partial name="AdminSideNavScripts" />
    <script src="~/cr/js/jquery.validate.min.js"></script>
    <script src="~/cr/js/jquery.validate.unobtrusive.min.js"></script>
    <script src="~/cr/js/unobtrusive-validation-bs4.min.js"></script>
}
